var _EsdDynamicTransformationFunction = function($){
/**
* 命名空间定义
*/
var _EsdDynamicTransformationScript = {};
_EsdDynamicTransformationScript.navBlock = {}; // 定义区域跳转类
_EsdDynamicTransformationScript.navBlock.selector = {};
/**
* 文本链接 a
*/
//保证所有a标签都有href
$("a").each(function(){

var aHref = this.href;
if( aHref=="" || aHref==undefined ){
$(this).attr("href","javascript:void(0)");
}

//给a标签加title
var aTitle = this.title;
var aText = this.text;

if( aTitle=="" || aTitle==undefined ){
if( aText!="" || aText!=undefined ){
$(this).attr("title",$.trim(aText));
}
}

});

//select下的option添加title
$("option").each(function(){
var oTitle = this.title;
var oText = this.text;
if( oTitle=="" || oTitle==undefined ){
if( oText!="" || oText!=undefined ){
$(this).attr("title",$.trim(oText));
}
}
});

$("#keyword").attr("title","请输入关键字");
$("#keyword").attr("placeholder","请输入关键字");
$("#keyword").parent().next().find("input").attr("title","搜索");

/**
* 图片处理片段
*/



$('img[src="./czdt/tpxw/201909/W020190902548931521440.jpg"]').attr('title','省财政厅领导班子召开“不忘初心 牢记使命”主题教育专题民主生活会').attr('alt','省财政厅领导班子召开“不忘初心 牢记使命”主题教育专题民主生活会');$('img[src="../images/p.gif"]').attr('title','装饰图片').attr('alt','装饰图片');$('img[src="./images/ns3.jpg"]').attr('title','内设机构').attr('alt','内设机构');$('img[src="./images/zwwb_tm_03.png"]').attr('title','微博图标').attr('alt','微博图标');$('img[src="./images/d208.jpg"]').attr('title','装饰性图片').attr('alt','装饰性图片');$('img[src="./images/add_btn_zxzjqd_0214.jpg"]').attr('title','财政专项资金清单').attr('alt','财政专项资金清单');$('img[src="./images/xxgk_02.jpg"]').attr('title','信息公开目录').attr('alt','信息公开目录');$('img[src="./images/add_btn_mlqd.jpg"]').attr('title','收费基金目录清单').attr('alt','收费基金目录清单');$('img[src="./images/cz_tmico.jpg"]').attr('title','装饰性图片').attr('alt','装饰性图片');$('img[src="../images/c.gif"]').attr('title','装饰图片').attr('alt','装饰图片');$('img[src="./images/2.jpg"]').attr('title','公众咨询').attr('alt','公众咨询');$('img[src="./zdzt/fpzjztz/images/P020180914332964794693.jpg"]').attr('title','扶贫资金总台帐').attr('alt','扶贫资金总台帐');$('img[src="./images/add_btn_qzqd_Xu191104.jpg"]').attr('title','权责清单').attr('alt','权责清单');$('img[src="./images/bwcx-czt-20190625.jpg"]').attr('title','不忘初心，牢记使命').attr('alt','不忘初心，牢记使命');$('img[src="./images/xxgk_03.jpg"]').attr('title','依申请公开').attr('alt','依申请公开');$('img[src="./images/xxgk_010.jpg"]').attr('title','规划计划').attr('alt','规划计划');$('img[src="../images/P020170606595986207460.jpg"]').attr('title','财政资料').attr('alt','财政资料');$('img[src="./czdt/tpxw/201904/W020190411534276142919.jpg"]').attr('title','谢忠岩厅长到长岭县就脱贫攻坚扫黑除恶县域经济运行开展调研').attr('alt','谢忠岩厅长到长岭县就脱贫攻坚扫黑除恶县域经济运行开展调研');$('img[src="./images/zcfg-20190423.jpg"]').attr('title','政策法规').attr('alt','政策法规');$('img[src="./images/xxgk_011.jpg"]').attr('title','决策结果公开').attr('alt','决策结果公开');$('img[src="./qt/tswz/201801/W020180103473089614853.jpg"]').attr('title','吉林省政府采购网').attr('alt','吉林省政府采购网');$('img[src="./qt/sybanner/201706/W020170616554113515260.jpg"]').attr('title','取之于民 用之于民 心系于民 服务于民').attr('alt','取之于民 用之于民 心系于民 服务于民');$('img[src="../images/list_04.jpg"]').attr('title','装饰图片').attr('alt','装饰图片');$('img[src="./images/xxgk_01.jpg"]').attr('title','信息公开指南').attr('alt','信息公开指南');$('img[src="./images/wsbs.jpg"]').attr('title','网上办事大厅').attr('alt','网上办事大厅');$('img[src="../images/list_01.jpg"]').attr('title','装饰图片').attr('alt','装饰图片');$('img[src="./images/xxgk_09.jpg"]').attr('title','规范性文件清理').attr('alt','规范性文件清理');$('img[src="../images/bg_hdjl20190121.jpg"]').attr('title','业务咨询，在线留言，意见征集，投诉举报').attr('alt','业务咨询，在线留言，意见征集，投诉举报');$('img[src="./images/jsjf-czt-20190625.jpg"]').attr('title','减税降费').attr('alt','减税降费');$('img[src="./images/xxgk_0302.jpg"]').attr('title','信息公开举报投诉').attr('alt','信息公开举报投诉');$('img[src="../images/@e5@88@86@e9@9a@94@e7@ac@a6.gif"]').attr('title','装饰图片').attr('alt','装饰图片');$('img[src="./images/P020170606598556629660.jpg"]').attr('title','政策法规').attr('alt','政策法规');$('img[src="./qt/sybanner/201706/W020170616554297757969.jpg"]').attr('title','抓增收 促发展 保民生 建机制 强队伍').attr('alt','抓增收 促发展 保民生 建机制 强队伍');$('img[src="./qt/sybanner/201706/W020170616554503268797.jpg"]').attr('title','充分发挥财政职能作用 促进吉林经济社会持续健康发展').attr('alt','充分发挥财政职能作用 促进吉林经济社会持续健康发展');$('img[src="./images/add_btn_yjs.png"]').attr('title','预决算信息').attr('alt','预决算信息');$('img[src="./images/xxgk_071.jpg"]').attr('title','“双公示”“双随机”').attr('alt','“双公示”“双随机”');$('img[src="./images/xxgk_08.jpg"]').attr('title','建议提案').attr('alt','建议提案');$('img[src="./images/ywzx_new2.jpg"]').attr('title','业务咨询').attr('alt','业务咨询');$('img[src="./images/z2.jpg"]').attr('title','机关党建').attr('alt','机关党建');$('img[src="./images/xxgk_0301.jpg"]').attr('title','信息公开依据').attr('alt','信息公开依据');$('img[src="../images/ej_06.jpg"]').attr('title','装饰图片').attr('alt','装饰图片');$('img[src="./images/xxgk_04.jpg"]').attr('title','信息公开报告').attr('alt','信息公开报告');$('img[src="./sypc/201907/W020190703406024285211.jpg"]').attr('title','吉林省财政厅减税降费政策措施').attr('alt','吉林省财政厅减税降费政策措施');$('img[src="./images/arrowb.jpg"]').attr('title','装饰性图片').attr('alt','装饰性图片');$('img[src="./images/jg1.jpg"]').attr('title','机构职能').attr('alt','机构职能');$('img[src="./images/Wechat.png"]').attr('title','微信图标').attr('alt','微信图标');$('img[src="./images/ts4.jpg"]').attr('title','厅属单位').attr('alt','厅属单位');$('img[src="./images/ld2.jpg"]').attr('title','领导简介').attr('alt','领导简介');$('img[src="./images/h2.jpg"]').attr('title','意见征集').attr('alt','意见征集');$('img[src="./images/r3.jpg"]').attr('title','装饰性图片').attr('alt','装饰性图片');$('img[src="./qt/tswz/201706/W020170609600055649204.jpg"]').attr('title','吉林省会计网').attr('alt','吉林省会计网');$('img[src="./qt/hqhm/201907/W020190724614821367660.png"]').attr('title','吉林省惠企惠民政策手册').attr('alt','吉林省惠企惠民政策手册');$('img[src="./images/h4_new2.jpg"]').attr('title','在线留言').attr('alt','在线留言');$('img[src="./czdt/tpxw/201904/W020190411540821088245.jpg"]').attr('title','谢忠岩厅长到长岭县就脱贫攻坚扫黑除恶县域经济运行开展调研').attr('alt','谢忠岩厅长到长岭县就脱贫攻坚扫黑除恶县域经济运行开展调研');$('img[src="../images/list_06.jpg"]').attr('title','装饰图片').attr('alt','装饰图片');$('img[src="./images/h3.jpg"]').attr('title','投诉举报').attr('alt','投诉举报');$('img[src="./qt/sybanner/201706/W020190122414675374406.jpg"]').attr('title','全面贯彻落实十九大精神 服务经济社会发展大局').attr('alt','全面贯彻落实十九大精神 服务经济社会发展大局');$('img[src="./images/z1.jpg"]').attr('title','预算绩效管理').attr('alt','预算绩效管理');$('img[src="./czdt/tpxw/201904/W020190430548186784229.jpg"]').attr('title','大督查_副本.jpg国务院“互联网+督查”小程序上线了！').attr('alt','大督查_副本.jpg国务院“互联网+督查”小程序上线了！');

//img
$("img").each(function(){
//给图片加alt/title
var imgAlt = this.alt,
imgTitle = this.title,
imgSrc = this.src,
parentText = this.parentElement.text;

if(this.alt=="" || this.alt==undefined){
if(imgTitle!="" && imgTitle!=undefined){
$(this).attr("alt",imgTitle);
}else if(parentText!="" && parentText!=undefined){
$(this).attr("alt",parentText);
}
}
if(this.title=="" || this.title==undefined){
if(imgAlt!="" && imgAlt!=undefined){
$(this).attr("title",imgAlt);
}else if(parentText!="" && parentText!=undefined){
$(this).attr("title",parentText);
}
}
})

$("img").each(function(){
if( (this.alt=="" && this.title=="")||(this.alt==undefined && this.title==undefined) ){
$(this).attr("title","图片");
$(this).attr("alt","图片");
}
})
/**
* 共通头部
*/
/**
* 主导航
*/
/**
* 网站所有幻灯片
*/

if(location.href=="http://czt.jl.gov.cn/" || location.href=="http://czt.jl.gov.cn/index.html"){
//首页


_EsdDynamicTransformationScript.slidePointIntervalsf = setInterval(function () {
if ( $("#slideBox .bd ul li:eq(3) span a")[0] != undefined
&& $("#slideBox .bd ul li:eq(2) span a")[0] != undefined
&& $("#slideBox .hd ul li:eq(3)")[0] != undefined
&& $("#slideBox .hd ul li:eq(0)")[0] != undefined ) {
clearInterval(_EsdDynamicTransformationScript.slidePointIntervalsf);

//轮播,右下角原点--鼠标移动触发情况

//轮播：只获取轮播中一个a标签。
//以文字a标签为主，图片a标签尽量不要，title不稳定

//轮播前的标签
_EsdDynamicTransformationScript.esdTagFrontNum1 = $("#keyword").parent().next().find("input");

//文字A标签
_EsdDynamicTransformationScript.esdTagANum1 = $("#slideBox .bd ul li:eq(0) span a");
_EsdDynamicTransformationScript.esdTagANum2 = $("#slideBox .bd ul li:eq(1) span a");
_EsdDynamicTransformationScript.esdTagANum3 = $("#slideBox .bd ul li:eq(2) span a");
_EsdDynamicTransformationScript.esdTagANum4 = $("#slideBox .bd ul li:eq(3) span a");

//原点
_EsdDynamicTransformationScript.esdTagCircleNum1 = $("#slideBox .hd ul li:eq(0)");
_EsdDynamicTransformationScript.esdTagCircleNum2 = $("#slideBox .hd ul li:eq(1)");
_EsdDynamicTransformationScript.esdTagCircleNum3 = $("#slideBox .hd ul li:eq(2)");
_EsdDynamicTransformationScript.esdTagCircleNum4 = $("#slideBox .hd ul li:eq(3)");

//轮播后的标签
//	  _EsdDynamicTransformationScript.esdTagAfterNum1 = $(".bor #slideBox").parent().next().find("a:first");


//轮播前的焦点
_EsdDynamicTransformationScript.esdTagFrontNum1.focus(function (e) {
$(document).bind("keydown.keydown_0", function (e) {
if(e.shiftKey&&e.keyCode==9){
$(document).unbind("keydown.keydown_0");
$("#keyword").focus();
return false;
}else if (e.keyCode == 9) {
//					console.log( _EsdDynamicTransformationScript.esdTagCircleNum1.html() );
//					console.log( _EsdDynamicTransformationScript.esdTagANum1.html() );

$(document).unbind("keydown.keydown_0");
_EsdDynamicTransformationScript.esdTagCircleNum1.mouseover();
_EsdDynamicTransformationScript.esdTagANum1.focus();
return false;
}
});
});
_EsdDynamicTransformationScript.esdTagFrontNum1.blur(function () {
$(document).unbind("keydown.keydown_0");
});



//第一块
_EsdDynamicTransformationScript.esdTagANum1.focus(function (e) {
//			_EsdDynamicTransformationScript.esdTagCircleNum1.mouseover();
$(document).bind("keydown.keydown_1", function (e) {
if(e.shiftKey&&e.keyCode==9){
$(document).unbind("keydown.keydown_1");
$("#keyword").parent().next().find("input").focus();
return false;
}else if (e.keyCode == 9) {
//					console.log( _EsdDynamicTransformationScript.esdTagCircleNum2.html() );
//					console.log( _EsdDynamicTransformationScript.esdTagANum2.html() );

$(document).unbind("keydown.keydown_1");
_EsdDynamicTransformationScript.esdTagCircleNum2.mouseover();
_EsdDynamicTransformationScript.esdTagANum2.focus();
return false;
}
});
});
_EsdDynamicTransformationScript.esdTagANum1.blur(function () {
$(document).unbind("keydown.keydown_1");
});

//第二块
_EsdDynamicTransformationScript.esdTagANum2.focus(function (e) {

//			_EsdDynamicTransformationScript.esdTagCircleNum2.mouseover();
$(document).bind("keydown.keydown_2", function (e) {
if(e.shiftKey&&e.keyCode==9){
_EsdDynamicTransformationScript.esdTagCircleNum1.mouseover();
_EsdDynamicTransformationScript.esdTagANum1.focus();
return false;
}else if (e.keyCode == 9) {
_EsdDynamicTransformationScript.esdTagCircleNum3.mouseover();
_EsdDynamicTransformationScript.esdTagANum3.focus();
return false;
}
});
});
_EsdDynamicTransformationScript.esdTagANum2.blur(function () {
$(document).unbind("keydown.keydown_2");
});

//第三块
_EsdDynamicTransformationScript.esdTagANum3.focus(function (e) {

//			_EsdDynamicTransformationScript.esdTagCircleNum3.mouseover();
$(document).bind("keydown.keydown_3", function (e) {
if(e.shiftKey&&e.keyCode==9){
_EsdDynamicTransformationScript.esdTagCircleNum2.mouseover();
_EsdDynamicTransformationScript.esdTagANum2.focus();
return false;
}else if (e.keyCode == 9) {
_EsdDynamicTransformationScript.esdTagCircleNum4.mouseover();
_EsdDynamicTransformationScript.esdTagANum4.focus();
return false;
}
});
});
_EsdDynamicTransformationScript.esdTagANum3.blur(function () {
$(document).unbind("keydown.keydown_3");
});

//第四块
_EsdDynamicTransformationScript.esdTagANum4.focus(function (e) {
//			_EsdDynamicTransformationScript.esdTagCircleNum4.mouseover();
$(document).bind("keydown.keydown_4", function (e) {
if(e.shiftKey&&e.keyCode==9){
_EsdDynamicTransformationScript.esdTagCircleNum3.mouseover();
_EsdDynamicTransformationScript.esdTagANum3.focus();
return false;
}else if (e.keyCode == 9) {
//					_EsdDynamicTransformationScript.esdTagAfterNum1.focus();
//					return false;
}
});

});
_EsdDynamicTransformationScript.esdTagANum4.blur(function () {
$(document).unbind("keydown.keydown_4");
});

//		//轮播后的焦点
//		_EsdDynamicTransformationScript.esdTagAfterNum1.focus(function (e) {
//
//			$(document).bind("keydown.keydown_5", function (e) {
//				if(e.shiftKey&&e.keyCode==9){
//					_EsdDynamicTransformationScript.esdTagCircleNum4.mouseover();
//					_EsdDynamicTransformationScript.esdTagANum4.focus();
//					return false;
//				}
////				else if (e.keyCode == 9) {
////
////					return true;
////				}
//			});
//
//		});
//		_EsdDynamicTransformationScript.esdTagAfterNum1.blur(function () {
//			$(document).unbind("keydown.keydown_5");
//		});

}
}, 500);

}



/**
* 主页js
*/

if(location.href=="http://czt.jl.gov.cn/" || location.href=="http://czt.jl.gov.cn/index.html"){
//首页

$("select[name='select5']").attr("title","全国财政系统");
$("select[name='select']").attr("title","本省财政系统");
$("select[name='select2']").attr("title","省政府及省直部门");
$("select[name='select3']").attr("title","财经相关网站");

//页面中间有个flash，焦点切换经过时，有的版本ie会发生跳点
$("#content>table:eq(4) object").attr("tabindex","-1");

//object上面的一个a
_EsdDynamicTransformationScript.esdObjectPrev = $("body > table:nth-child(13) > tbody > tr > td:nth-child(2) > table:nth-child(4) > tbody > tr:nth-child(2) > td > table > tbody > tr > td > table > tbody > tr:nth-child(7) > td:nth-child(2) > span > a");
//object下面的一个a
_EsdDynamicTransformationScript.esdObjectNext = $("body > table:nth-child(13) > tbody > tr > td:nth-child(2) > table:nth-child(6) > tbody > tr > td:nth-child(1) > table > tbody > tr:nth-child(1) > td > table > tbody > tr > td:nth-child(3) > span > a");

_EsdDynamicTransformationScript.esdObjectPrev.focus(function (e) {
$(this).bind("keydown.keydownsss_0", function (e) {
if(e.shiftKey&&e.keyCode==9){

}else if(e.keyCode == 9) {
_EsdDynamicTransformationScript.esdObjectNext.focus();
return false;
}
});
});
_EsdDynamicTransformationScript.esdObjectPrev.blur(function () {
$(this).unbind("keydown.keydownsss_0");
});

_EsdDynamicTransformationScript.esdObjectNext.focus(function (e) {
$(this).bind("keydown.keydownsss_1", function (e) {
if(e.shiftKey&&e.keyCode==9){
_EsdDynamicTransformationScript.esdObjectPrev.focus();
return false;
}else if (e.keyCode == 9) {

}
});
});
_EsdDynamicTransformationScript.esdObjectNext.blur(function () {
$(this).unbind("keydown.keydownsss_1");
});



// 将iframe所包含的a链接数 第一个a元素 最后一个a元素赋值给第一个参数的js对象
_EsdDynamicTransformationScript.getIframeInfos = function(jsObj,iframeObj){
jsObj.aLink_num = iframeObj.contentWindow.document.getElementsByTagName("a").length;
jsObj.first_aLink = iframeObj.contentWindow.document.getElementsByTagName("a")[0];
jsObj.last_aLink = iframeObj.contentWindow.document.getElementsByTagName("a")[jsObj.aLink_num-1];
jsObj.self = iframeObj;
};

// 声明iframe操作对象
_EsdDynamicTransformationScript.iframe1 = {};
_EsdDynamicTransformationScript.iframe2 = {};

//通过方法赋值
_EsdDynamicTransformationScript.iframeElement1 = document.getElementsByTagName("iframe")[3];   // 需要修改 这里的iframe获取
_EsdDynamicTransformationScript.iframeElement2 = document.getElementsByTagName("iframe")[4];   // 需要修改 这里的iframe获取


//选项卡标签 jquery对象
_EsdDynamicTransformationScript.iframeTab1 = $("#tab2_t1 a");  // 需要修改 这里的tab获取
_EsdDynamicTransformationScript.iframeTab2 = $("#tab2_t2 a");  // 需要修改 这里的tab获取


// 判断iframe是否有效
if((_EsdDynamicTransformationScript.iframeElement1!=undefined) && (_EsdDynamicTransformationScript.iframeElement2!=undefined)){

// 当iframe都加载完毕后执行代码 使用setInterval
_EsdDynamicTransformationScript.iframeInterval = setInterval(function(){

if((_EsdDynamicTransformationScript.iframeElement1.contentWindow.document.getElementsByTagName("a")[0]!=undefined)
&& (_EsdDynamicTransformationScript.iframeElement2.contentWindow.document.getElementsByTagName("a")[0]!=undefined) ){
clearInterval(_EsdDynamicTransformationScript.iframeInterval);

//通过方法赋值
_EsdDynamicTransformationScript.getIframeInfos(_EsdDynamicTransformationScript.iframe1,_EsdDynamicTransformationScript.iframeElement1);
_EsdDynamicTransformationScript.getIframeInfos(_EsdDynamicTransformationScript.iframe2,_EsdDynamicTransformationScript.iframeElement2);

//第一个标签 切换
_EsdDynamicTransformationScript.iframeTab1.focus(function (e) {
e = $(this).mouseover();
$(this).bind("keydown.iframeKeydown_1", function (e) {
if (e.shiftKey && e.keyCode == 9) {
_EsdDynamicTransformationScript.iframeTab1.trigger("blur");
$("select[name='select3']").focus();
return false;
} else if (e.keyCode == 9) {
_EsdDynamicTransformationScript.iframeTab1.trigger("blur");
$(_EsdDynamicTransformationScript.iframe1.self).focus();
return false;
}
});
});
_EsdDynamicTransformationScript.iframeTab1.blur(function () {
$(this).unbind("keydown.iframeKeydown_1");
});

// 第一个标签的第一个链接
$(_EsdDynamicTransformationScript.iframe1.first_aLink).focus(function () {
$(_EsdDynamicTransformationScript.iframe1.self.contentWindow.document).bind("keydown.iframeKeydown_first1", function (e) {
if (e.shiftKey && e.keyCode == 9) {
$(this).trigger("blur");
_EsdDynamicTransformationScript.iframeTab1.focus();
return false;
} else if (e.keyCode == 9) {
}
});
});
$(_EsdDynamicTransformationScript.iframe1.first_aLink).blur(function () {
$(_EsdDynamicTransformationScript.iframe1.self.contentWindow.document).unbind("keydown.iframeKeydown_first1");
});

// 第一个标签的最后一个链接
$(_EsdDynamicTransformationScript.iframe1.last_aLink).focus(function () {
$(_EsdDynamicTransformationScript.iframe1.self.contentWindow.document).bind("keydown.iframeKeydown_first1", function (e) {
if (e.shiftKey && e.keyCode == 9) {
} else if (e.keyCode == 9) {
$(this).trigger("blur");
_EsdDynamicTransformationScript.iframeTab2.focus();
return false;
}
});
});
$(_EsdDynamicTransformationScript.iframe1.last_aLink).blur(function () {
$(_EsdDynamicTransformationScript.iframe1.self.contentWindow.document).unbind("keydown.iframeKeydown_first1");
});


//第二个标签切换
_EsdDynamicTransformationScript.iframeTab2.focus(function (e) {
e = $(this).mouseover();
$(this).bind("keydown.iframeKeydown_2", function (e) {
if (e.shiftKey && e.keyCode == 9) {
_EsdDynamicTransformationScript.iframeTab2.trigger("blur");
_EsdDynamicTransformationScript.iframeTab1.mouseover();
$(_EsdDynamicTransformationScript.iframe1.last_aLink).focus();
return false;
} else if (e.keyCode == 9) {
_EsdDynamicTransformationScript.iframeTab2.trigger("blur");
$(_EsdDynamicTransformationScript.iframe2.self).focus();
return false;
}
});

});
_EsdDynamicTransformationScript.iframeTab2.blur(function () {
$(this).unbind("keydown.iframeKeydown_2");
});

}
}, 500);

}



//首页结束
}


/**
* 二级页
*/

// -------------------------------二级页------------------------------------
if(location.href=="http://czt.jl.gov.cn/hdjl/gzzx/wyxx/"){
//热点问题，我要写信

_EsdDynamicTransformationScript.slidePointIntervalrd = setInterval(function () {
if ( document.getElementsByTagName("iframe")[1].contentWindow.document.getElementById("SubmitButton") != undefined ) {
clearInterval(_EsdDynamicTransformationScript.slidePointIntervalrd);

var inputIframe = document.getElementsByTagName("iframe")[1].contentWindow.document;
$(inputIframe).find("#frmData input:eq(0)").attr({placeholder:"姓名",title:"姓名"});
$(inputIframe).find("#frmData input:eq(1)").attr({placeholder:"联系电话",title:"联系电话"});
$(inputIframe).find("#frmData input:eq(2)").attr({placeholder:"年龄",title:"年龄"});
$(inputIframe).find("#frmData input:eq(3)").attr({placeholder:"邮箱",title:"邮箱"});
$(inputIframe).find("#frmData input:eq(4)").attr({placeholder:"手机号码",title:"手机号码"});
$(inputIframe).find("#frmData input:eq(5)").attr({placeholder:"邮政编码",title:"邮政编码"});
$(inputIframe).find("#frmData input:eq(6)").attr({placeholder:"联系地址",title:"联系地址"});
$(inputIframe).find("#frmData input:eq(7)").attr({placeholder:"证件号码",title:"证件号码"});
$(inputIframe).find("#frmData input:eq(8)").attr({placeholder:"类型",title:"类型"});
$(inputIframe).find("#frmData input:eq(9)").attr({placeholder:"主题",title:"主题"});
$(inputIframe).find("#frmData input:eq(10)").attr({placeholder:"公开",title:"公开"});
$(inputIframe).find("#frmData input:eq(11)").attr({placeholder:"不公开",title:"不公开"});

$(inputIframe).find("#frmData textarea").attr({placeholder:"内容",title:"内容"});

$(inputIframe).find("#SubmitButton").attr("title","提交");
$(inputIframe).find("#ResetButton").attr("title","重置");

}
}, 500);

}
/**
* 共通底部处理
*/
/**
* 文本链接 a
*/
//	_EsdDynamicTransformationScript.navBlock = {}; //定义区域跳转类
//	_EsdDynamicTransformationScript.navBlock.debug = true; //是否是调试模式，调试模式有红边线，非调试模式关闭红边框
//	//定义跳转 使用jquery选择器语法
//	_EsdDynamicTransformationScript.navBlock.selector = {};

//公共的
_EsdDynamicTransformationScript.navBlock.selector.top = "#alink";
$("#alink > tbody > tr:nth-child(2) > td > table").attr("id","nav");
_EsdDynamicTransformationScript.navBlock.selector.nav = "#alink";
$("body > iframe:last").attr("id","footer");
_EsdDynamicTransformationScript.navBlock.selector.footer = "#footer";

//面包屑导航（除首页），实际目标是上下一体结构的目录页
if( $(".CurrChnlCls").length > 0 ){

//目录页的翻页input处理
$("#num").attr("title","跳转到第多少页");
$("#num").attr("placeholder","跳转到第多少页");
$(".zt9 input[type='submit']").attr("title","提交");
$(".zt9 input[type='submit']").attr("placeholder","提交");

$("body > table:nth-child(6)").attr("id","main");
_EsdDynamicTransformationScript.navBlock.selector.main = "#main";

//给栏目的class属性添加navBlock值来标识这是需要切的栏目区块。
$("body > table:nth-child(6)").addClass("navBlock");
$("body > table:nth-child(6) > tbody > tr:nth-child(1)").addClass("navBlock");
$("body > table:nth-child(6) > tbody > tr:nth-child(2)").addClass("navBlock");

_EsdDynamicTransformationScript.navBlock.selector.activate = ".navBlock"; //激活的采用class因为会激活多个
}

//实际目标是左右结构的目录页（这里面包含了文章页，下面文章页单独处理会覆盖它）
if( location.href.startsWith("http://czt.jl.gov.cn/jggk/") || location.href.startsWith("http://czt.jl.gov.cn/zzfg/") || location.href.startsWith("http://czt.jl.gov.cn/sjzl/") ){
$("body > table:nth-child(6)").attr("id","main");
_EsdDynamicTransformationScript.navBlock.selector.main = "#main";
$("body > table:nth-child(6) > tbody > tr:nth-child(1) > td:nth-child(1)").attr("id","left");
_EsdDynamicTransformationScript.navBlock.selector.left = "#left";
$("body > table:nth-child(6) > tbody > tr:nth-child(1) > td:nth-child(2)").attr("id","right");
_EsdDynamicTransformationScript.navBlock.selector.right = "#right";

_EsdDynamicTransformationScript.navBlock.selector.content = "#content";
//给栏目的class属性添加navBlock值来标识这是需要切的栏目区块。
$("body > table:nth-child(6) > tbody > tr:nth-child(1) > td:nth-child(1)").addClass("navBlock");
$("body > table:nth-child(6) > tbody > tr:nth-child(1) > td:nth-child(2)").addClass("navBlock");

_EsdDynamicTransformationScript.navBlock.selector.activate = ".navBlock"; //激活的采用class因为会激活多个
}

//上下一体结构目录
if( $(".blu").length > 0 ){

//目录页的翻页input处理
$("#num").attr("title","跳转到第多少页");
$("#num").attr("placeholder","跳转到第多少页");
$(".zt9 input[type='submit']").attr("title","提交");
$(".zt9 input[type='submit']").attr("placeholder","提交");

$("body > table:eq(1)").attr("id","main");
_EsdDynamicTransformationScript.navBlock.selector.main = "#main";
$("body > table:eq(1) > tbody > tr:eq(1)").attr("id","content");
_EsdDynamicTransformationScript.navBlock.selector.content = "#content";

//给栏目的class属性添加navBlock值来标识这是需要切的栏目区块。
$("body > table:eq(1) > tbody > tr:eq(0)").addClass("navBlock");
$("body > table:eq(1) > tbody > tr:eq(1)").addClass("navBlock");

_EsdDynamicTransformationScript.navBlock.selector.activate = ".navBlock"; //激活的采用class因为会激活多个
}


//文章页处理
if( $(".colorfont").length > 0 ){
$(".bkh").attr("id","main");
_EsdDynamicTransformationScript.navBlock.selector.main = "#main";
$(".concent").attr("id","content");
_EsdDynamicTransformationScript.navBlock.selector.content = "#content";

//给栏目的class属性添加navBlock值来标识这是需要切的栏目区块。
$(".bkh").addClass("navBlock");
$("body > table.bkh > tbody > tr > td > table:nth-child(2)").addClass("navBlock");
$("body > table.bkh > tbody > tr > td > table:nth-child(3)").addClass("navBlock");

_EsdDynamicTransformationScript.navBlock.selector.activate = ".navBlock"; //激活的采用class因为会激活多个
}

if(location.href=="http://czt.jl.gov.cn/" || location.href=="http://czt.jl.gov.cn/index.html"){
//首页
$("body>.bor").attr("id","main");
_EsdDynamicTransformationScript.navBlock.selector.main = "#main";
$("body>table:eq(5) tbody tr>td:eq(0)").attr("id","left");
_EsdDynamicTransformationScript.navBlock.selector.left = "#left";
$("body>table:eq(5) tbody tr>td:eq(2)").attr("id","right");
_EsdDynamicTransformationScript.navBlock.selector.right = "#right";
$("body>table:eq(5) tbody tr>td:eq(1)").attr("id","content");
_EsdDynamicTransformationScript.navBlock.selector.content = "#content";
//给栏目的class属性添加navBlock值来标识这是需要切的栏目区块。
$("#slideBox").addClass("navBlock");
$("#slideBox").parent().next().addClass("navBlock");
$("#slideBox1").addClass("navBlock");
$("#main > tbody > tr > td:nth-child(2)").addClass("navBlock");
$("body > table:nth-child(17) > tbody > tr > td:nth-child(1) > table").addClass("navBlock");
$("body > table:nth-child(17) > tbody > tr > td:nth-child(2) > table").addClass("navBlock");
$("body > table:nth-child(17) > tbody > tr > td:nth-child(3) > table").addClass("navBlock");

_EsdDynamicTransformationScript.navBlock.selector.activate = ".navBlock"; //激活的采用class因为会激活多个
}


if(location.href=="http://czt.jl.gov.cn/hdjl/gzzx/wyxx/"){
//热点问题，我要写信

//主要修改部分把网站对应的选择器赋值给相应的变量。或用jquery把默认的id复制给网站的元素****************************此处重要位置修改
$("iframe:first").attr("id","header");
_EsdDynamicTransformationScript.navBlock.selector.top = "#header";
_EsdDynamicTransformationScript.navBlock.selector.nav = "#header";
$("table:first").attr("id","main");
_EsdDynamicTransformationScript.navBlock.selector.main = "#main";
//给栏目的class属性添加navBlock值来标识这是需要切的栏目区块。
$("table:first table").addClass("navBlock");

_EsdDynamicTransformationScript.navBlock.selector.activate = ".navBlock"; //激活的采用class因为会激活多个
}


/**
* 区域导航、调试开关
*/

$(document).bind("keydown.keydown_9001", function(e) {
if (e.shiftKey && e.keyCode == 20) {
$("*").focus(function() {
$(this).css({
"outline" : "2px dashed red"
});
});
$("*").blur(function() {
$(this).css({
"outline" : "0px black"
});
});
}
});

_EsdDynamicTransformationScript.navBlock.debug = true; // 是否是调试模式，调试模式有红边线，非调试模式关闭红边框
_EsdDynamicTransformationScript.navBlock.selector.activate = ".navBlock"; // 激活的采用class因为会激活多个
// 快捷键定义区
//_EsdDynamicTransformationScript.navBlock.key = {};

//_EsdDynamicTransformationScript.navBlock.key.top = "alt+1"; // (top)
//_EsdDynamicTransformationScript.navBlock.key.nav = "alt+2"; // (nav)
//_EsdDynamicTransformationScript.navBlock.key.main = "alt+3"; // (main)
//_EsdDynamicTransformationScript.navBlock.key.content = "alt+4"; // (content)
//_EsdDynamicTransformationScript.navBlock.key.left = "alt+5"; // (left)
//_EsdDynamicTransformationScript.navBlock.key.right = "alt+6"; // (right)
//_EsdDynamicTransformationScript.navBlock.key.footer = "alt+7"; // (footer)
//_EsdDynamicTransformationScript.navBlock.key.down = "alt+8"; // (down)
//_EsdDynamicTransformationScript.navBlock.key.up = "alt+9"; // (up);

// 以下变量主要用于区块跳转
_EsdDynamicTransformationScript.navBlock.sIndex = -1; // 当前栏目下标
_EsdDynamicTransformationScript.navBlock.maxIndex = -1; // 保存目前所有class="navBlock"的区域块总数量，栏目总量下标。
_EsdDynamicTransformationScript.navBlock.minIndex = 0; // 栏目数量起始下标

// 主要代码区域

// 导航跳转
_EsdDynamicTransformationScript.navBlock.keyShowSelect = function(i) {
$(_EsdDynamicTransformationScript.navBlock.selector.activate).each(function(index, el) {
if (i == index) {
_EsdDynamicTransformationScript.navBlock.debugView(el);
$(el).find("a").each(function(i, e) {
if (i == 0) {
$(e).focus();
}
});

}
});
}

// 获取所有class=navBlock的区域的总数量，初始化轮训所有需要跳转的块
$(_EsdDynamicTransformationScript.navBlock.selector.activate).each(function(index, ehx) {
_EsdDynamicTransformationScript.navBlock.maxIndex++;
});



// 快捷键功能区域
// 跳转到头部alt+1(49)
$(document).keydown(function(e) {
if (e.altKey && e.keyCode == 49) {
_EsdDynamicTransformationScript.navBlock.keySelectScroll(_EsdDynamicTransformationScript.navBlock.selector.top);
}

});
// 跳转到导航alt+2(50)
$(document).keydown(function(e) {
if (e.altKey && e.keyCode == 50) {
_EsdDynamicTransformationScript.navBlock.keySelectScroll(_EsdDynamicTransformationScript.navBlock.selector.nav);
}

});
// 跳转到主要区域alt+3(51)
$(document).keydown(function(e) {
if (e.altKey && e.keyCode == 51) {
_EsdDynamicTransformationScript.navBlock.keySelectScroll(_EsdDynamicTransformationScript.navBlock.selector.main);
}
});

// 跳转到正文区域alt+4(52)
$(document).keydown(function(e) {
if (e.altKey && e.keyCode == 52) {
_EsdDynamicTransformationScript.navBlock.keySelectScroll(_EsdDynamicTransformationScript.navBlock.selector.content);
}
});

// 跳转到左区域alt+5(53)
$(document).keydown(function(e) {
if (e.altKey && e.keyCode == 53) {
_EsdDynamicTransformationScript.navBlock.keySelectScroll(_EsdDynamicTransformationScript.navBlock.selector.left);
}
});

// 跳转到右区域alt+6(54)
$(document).keydown(function(e) {
if (e.altKey && e.keyCode == 54) {
_EsdDynamicTransformationScript.navBlock.keySelectScroll(_EsdDynamicTransformationScript.navBlock.selector.right);
}
});
// 跳转到底部alt+7(55)
$(document).keydown(function(e) {
if (e.altKey && e.keyCode == 55) {
_EsdDynamicTransformationScript.navBlock.keySelectScroll(_EsdDynamicTransformationScript.navBlock.selector.footer);
}
});
//前进alt+8(56)
$(document).keydown(function(e) {
if (e.altKey && e.keyCode == 56) {
if (_EsdDynamicTransformationScript.navBlock.sIndex < _EsdDynamicTransformationScript.navBlock.maxIndex) {
_EsdDynamicTransformationScript.navBlock.sIndex++;
_EsdDynamicTransformationScript.navBlock.keyShowSelect(_EsdDynamicTransformationScript.navBlock.sIndex);
}
}
});

// 后退alt+9(57)
$(document).keydown(function(e) {
if (e.altKey && e.keyCode == 57) {
if (_EsdDynamicTransformationScript.navBlock.sIndex > _EsdDynamicTransformationScript.navBlock.minIndex) {
_EsdDynamicTransformationScript.navBlock.sIndex--;
_EsdDynamicTransformationScript.navBlock.keyShowSelect(_EsdDynamicTransformationScript.navBlock.sIndex);
}
}
});
// 特定区域跳转
_EsdDynamicTransformationScript.navBlock.keySelectScroll = function(id) {
if ($(id).length > 0) {
_EsdDynamicTransformationScript.navBlock.appendIns(id,true);//插入ins
_EsdDynamicTransformationScript.navBlock.debugView(id);
$(id).find("a").each(function(index) {
if (index == 0) {
$(this).focus();
}
});
_EsdDynamicTransformationScript.navBlock.appendIns(id,false);//清楚ins
} else {
}

}
//为了解决漂浮高等于0的情况下区域显示是一条线
_EsdDynamicTransformationScript.navBlock.appendIns=function(id,b){
if(b==true){
$(id).append("<ins id='esdNavBlockIns' style='clear: both;display: block;'></ins>")
}else{
$("#esdNavBlockIns").remove();
}
}

if (_EsdDynamicTransformationScript.navBlock.debug == true) {
// 如果开启调试模式，添加调试绘制矩形边线
$("body").append("<div id='show_top' class='lineshow'></div>");
$("body").append("<div id='show_bottom' class='lineshow'></div>");
$("body").append("<div id='show_left' class='lineshow'></div>");
$("body").append("<div id='show_right' class='lineshow'></div>");
$(".lineshow").css({
"display" : "none"
});
}
// 开启调试模式后会显示红边
_EsdDynamicTransformationScript.navBlock.debugView = function(e) {
if (_EsdDynamicTransformationScript.navBlock.debug == true) {
var x = $(e).offset();
//var w = parseInt($(e).css("width"));
var w = $(e).outerWidth();//返回元素的宽度（包含 padding 和 border）
//var h = parseInt($(e).css("height"));
var h = $(e).outerHeight();//返回元素的高度（包含 padding 和 border）
$("#show_top").css({
"z-index" : "9999",
"border" : "red 2px solid",
"position" : "absolute",
"top" : x.top,
"left" : x.left,
"width" : w,
"height" : "0px"
});
$("#show_bottom").css({
"z-index" : "9999",
"border" : "red 2px solid",
"position" : "absolute",
"top" : x.top + h,
"left" : x.left,
"width" : w,
"height" : "0px"
});
$("#show_left").css({
"z-index" : "9999",
"border" : "red 2px solid",
"position" : "absolute",
"top" : x.top,
"left" : x.left,
"width" : "0px",
"height" : h
});
$("#show_right").css({
"z-index" : "9999",
"border" : "red 2px solid",
"position" : "absolute",
"top" : x.top,
"left" : x.left + w,
"width" : "0px",
"height" : h
});
$("html,body").animate({
scrollTop : $("#show_top").offset().top
}, 200);
$(".lineshow").css({
"display" : "block"
});
}
}
};
/**
* 主入口方法
*/

if (window.jQuery == undefined) {
var wzaInitInterval = setInterval(function(){
if(document.body!=null){
clearInterval(wzaInitInterval);
//			var originalWindowOnload = null;
//			if(window.onload!=null){
//				originalWindowOnload = window.onload;
//			}
document.body.onload = function(){
//				originalWindowOnload();
var esdJquery = document.createElement("script");
esdJquery.setAttribute("type", "text/javascript");
esdJquery.setAttribute("src", window.location.protocol + "//" + window.location.href.split("/")[2] + "/wza/bwscript/jquery-1.12.4.min.js");
esdJquery.setAttribute("charset", "utf-8");
esdJquery.setAttribute("id", "ESDWebAppInnerIframe");
document.body.appendChild(esdJquery);
var jqueryLoadInterval = setInterval(function () {
if (window.jQuery != undefined) {
clearInterval(jqueryLoadInterval);
setTimeout( _EsdDynamicTransformationFunction(jQuery) , 1000 );
//						_EsdDynamicTransformationFunction(jQuery)
}
}, 500);
};
}
}, 10);
} else {
jQuery(function(){
setTimeout( _EsdDynamicTransformationFunction(jQuery) , 1000 );
//		_EsdDynamicTransformationFunction(jQuery)
})

}
